Search Results: "sune"

15 May 2015

Sune Vuorela: Getting a Q_INVOKABLE C++ function reevaluated by QML engine

Unfortunately, with all the normal magic of QML property bindings, getting a property updated in a setup that involves return values from functions isn t really doable, like this:

Text
text: qtobject.calculatedValue()


I m told there is a low priority feature request for a way of signalling that a function now returns a different value and all properties using it should be reevaluated. I have so far discovered two different workarounds for that that I will be presenting here. Using an extra property Appending an extra property to trigger the reevaluation of the function is one way of doing it.

Text
text: qtobject.calculatedValue() + qtobject.emptyNotifierThing


with the following on the C++ side:

Q_PROPERTY(QString emptyNotifierThing READ emptyString NOTIFY valueChanged)
QString emptyString() const
return QString();

This is a bit more code to write and to remember to use, but it does get the job done. Intermediate layer
Another way is to inject an intermediate layer, an extra object, that has the function. It can even be simplified by having a pointer to itself.

Text
text: qtobject.dataAccess.calculatedValue()


with the following on the C++ side:

Q_PROPERTY(QObject* dataAccess READ dataAccess NOTIFY valueChanged)
QObject* dataAccess()
return this;

It seems a bit simpler for the reader on the QML side, but also gets the job done. I am not sure which way is the best one, but the intermediate layer has a nicer feeling to it when more complicated types are involved.

23 March 2015

Mario Lang: Why is Qt5 not displaying Braille?

While evaluating the cross-platform accessibility of Qt5, I stumbled across this deficiency:
#include <QApplication>
#include <QTextEdit>
int main(int argv, char **args)
 
  QApplication app(argv, args);
  QTextEdit textEdit;
  textEdit.setText(u8"\u28FF");
  textEdit.show();
  return app.exec();
 
(compile with -std=c++11). On my system, this "application" does not show the correct glyph always. Sometimes, it renders a a white square with black border, i.e., the symbol for unknown glyph. However, if I invoke the same executable several times, sometimes, it renders the glyph correctly. In other words: The glyph choosing mechansim is apparently non-deterministic!!! UPDATE: Sune Vuorela figured out that I need to set QT_HARFBUZZ=old in the environment for this bug to go away. Apparently, harfbuzz-ng from Qt 5.3 is buggy.

25 November 2014

Sune Vuorela: QImage and QPixmap in a Qt Quick item

For reasons I don t know, apparantly a Qt Quick Item that can show a QImage or a QPixmap is kind of missing. The current Image QML item only works with data that can be represented by a URL. So I wrote one that kind of works. Comments most welcome. It is found on git.kde.org: http://quickgit.kde.org/?p=scratch/sune/imageitem.git Oh, and the KDE End of Year fundraiser is still running. https://www.kde.org/fundraisers/yearend2014/. Go support it if you haven t already.

22 November 2014

Sune Vuorela: Is linux about choice?

Occasionally, various quotes from people having an opinion if linux is about choice or not. Even pages like http://www.islinuxaboutchoice.com/ has shown up. My short answer is YES . Linux is about choice. And you get all your choices directly from your f/loss definition of choice (FSF s 4 freedoms / OSI s opensource definition / Debian Free Software Guidelines) It doesn t mean that you get all the gui configuration bits that you want. It doesn t mean that you without any problems can switch out any component. But it does mean that you can get it exactly your way. But it might require you to edit some source code and compile some stuff.

26 October 2014

Sune Vuorela: KDE makes Qt

Recently I was trying some statistics on the qtbase-module (where QtCore, QtGui, QtWidgets and so on lives) and was wondering who made them.
Not based on their current paid affilation, like Thiago s graphs, but if each commit was made by a person coming from KDE. So, I got hold of Thiago s scripts, a lovely mix of perl and zsh, and a QtBase git repository. First steps was to try to classify people as person coming from KDE or not. Of course, I m a KDE person. Thiago is a KDE person. David Faure is a KDE person. Olivier Goffart is a KDE person. Lars Knoll is a KDE person. By the help of the KDE accounts file, and some of the long time KDE contributors, I got after a half day of work a good list of it. Then next steps was trying to put it into Thiago s perlscripts All of it kind of succeeded: qtbase-KDE.graph So, KDE people makes up for 40-60% of the weekly commits to QtBase. This is again shows that KDE is important to Qt, just as the reverse is. So, let s keep KDE healthy. KDE is running a end-of-year fundraiser over here https://www.kde.org/fundraisers/yearend2014/. Go ahead and donate, and help KDE stay healthy. For your own sake. And for Qt s.

8 August 2014

Sune Vuorela: Fun and joy with .bat files

Occasionally, one gets in touch with kind of foreign technologies and needs to get stuff working anyways. Recently, I had to do some various hacking with and around .bat files. Bat files are a kind of script files for Microsoft Windows. Calling external commands Imagine need to call some other command, let s say git diff. So from a cmd thing, you would write
git diff
similar to writing shell scripts on unixes. But there is a catch. If the thing you want to call is another bat-script, just calling it ensures it replaces the current script and never returns. So you need
call git diff
if the command you want to run is a bat file and you want to return to your script. Calling an external helper next to your script
If you for some reason needs to call some external helper placed next to your script, there is a helpful thing to do that as well. Imagine your helper is called helper.bat
call %~dp0helper.bat
is the very self-explanatory way of doing that. Stopping execution of your script If you somehow encounter some condition in your script that requires you to stop your script, there is a command exit handy. It even takes a argument for what error code there is.
exit 2
stops your script with return code 2. But it also have the nice added feature that if you do it in a script you run by hand in a terminal, it also exits the terminal. Luckily there is also a fix for that:
exit /b 2
and it doesn t exit your interactive terminal, and it sets the %ERRORLEVEL% variable to the exit code. Fortunately, the fun doesn t stop here. If the script is run non-interactively, exit /b doesn t set the exit code for for example perl s system() call. You need to use exit without /b for that. So now you need two scripts. one for interactive use that calls exit /b and a similar one using exit for use by other apps/scripts. Or, we can combine some of our knowledge and add a extra layer of indirection. and then success. Oh. and on a unrelated note. Windows can t schedule tasks for users that aren t logged in and don t have a password set. The response Access Denied is the only clue given.

6 August 2014

Russell Coker: Booting GPT

I m installing new 4TB disks on an older Dell server, it s a PowerEdge T110 with a G6950 CPU so it s not really old, but it s a couple of generations behind the latest Dell servers. I tried to enable UEFI booting, but when I turned that option on the system locked up during the BIOS process (wouldn t boot from the CD or take keyboard input). So I had to make it boot with a BIOS compatible MBR and a GPT partition table. Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02 BIOS boot partition
2 4096 25169919 12.0 GiB FD00 Linux RAID
3 25169920 7814037134 3.6 TiB 8300 Linux filesystem After spending way to much time reading various web pages I discovered that the above partition table works. The 1MB partition is for GRUB code and needs to be enabled by a parted command such as the following: parted /dev/sda set 1 bios_grub on /dev/sda2 is a RAID-1 array used for the root filesystem. If I was installing a non-RAID system I d use the same partition table but with a type of 8300 instead of FD00. I have a RAID-1 array over sda2 and sdb2 for the root filesystem and sda3, sdb3, sdc3, sdd3, and sde3 are used for a RAID-Z array. I m reserving space for the root filesystem on all 5 disks because it seems like a good idea to use the same partition table and the 12G per disk that is unused on sdc, sdd, and sde isn t worth worrying about when dealing with 4TB disks.

16 July 2014

Matthias Klumpp: AppStream 0.7 specification and library released

appstream-logoToday I am very happy to announce the release of AppStream 0.7, the second-largest release (judging by commit number) after 0.6. AppStream 0.7 brings many new features for the specification, adds lots of good stuff to libappstream, introduces a new libappstream-qt library for Qt developers and, as always, fixes some bugs. Unfortunately we broke the API/ABI of libappstream, so please adjust your code accordingly. Apart from that, any other changes are backwards-compatible. So, here is an overview of what s new in AppStream 0.7: Specification changes Distributors may now specify a new <languages/> tag in their distribution XML, providing information about the languages a component supports and the completion-percentage for the language. This allows software-centers to apply smart filtering on applications to highlight the ones which are available in the users native language. A new addon component type was added to represent software which is designed to be used together with a specific other application (think of a Firefox addon or GNOME-Shell extension). Software-center applications can group the addons together with their main application to provide an easy way for users to install additional functionality for existing applications. The <provides/> tag gained a new dbus item-type to expose D-Bus interface names the component provides to the outside world. This means in future it will be possible to search for components providing a specific dbus service:
$ appstream-index what-provides dbus org.freedesktop.PackageKit.desktop system
(if you are using the cli tool) A <developer_name/> tag was added to the generic component definition to define the name of the component developer in a human-readable form. Possible values are, for example The KDE Community , GNOME Developers or even the developer s full name. This value can be (optionally) translated and will be displayed in software-centers. An <update_contact/> tag was added to the specification, to provide a convenient way for distributors to reach upstream to talk about changes made to their metadata or issues with the latest software update. This tag was already used by some projects before, and has now been added to the official specification. Timestamps in <release/> tags must now be UNIX epochs, YYYYMMDD is no longer valid (fortunately, everyone is already using UNIX epochs). Last but not least, the <pkgname/> tag is now allowed multiple times per component. We still recommend to create metapackages according to the contents the upstream metadata describes and place the file there. However, in some cases defining one component to be in multiple packages is a short way to make metadata available correctly without excessive package-tuning (which can become difficult if a <provides/> tag needs to be satisfied). As small sidenote: The multiarch path in /usr/share/appdata is now deprecated, because we think that we can live without it (by shipping -data packages per library and using smarter AppStream metadata generators which take advantage of the ability to define multiple <pkgname/> tags) Documentation updates In general, the documentation of the specification has been reworked to be easier to understand and to include less duplication of information. We now use excessive crosslinking to show you the information you need in order to write metadata for your upstream project, or to implement a metadata generator for your distribution. Because the specification needs to define the allowed tags completely and contain as much information as possible, it is not very easy to digest for upstream authors who just want some metadata shipped quickly. In order to help them, we now have Quickstart pages in the documentation, which are rich of examples and contain the most important subset of information you need to write a good metadata file. These quickstart guides already exist for desktop-applications and addons, more will follow in future. We also have an explicit section dealing with the question How do I translate upstream metadata? now. More changes to the docs are planned for the next point releases. You can find the full project documentation at Freedesktop. AppStream GObject library and tools The libappstream library also received lots of changes. The most important one: We switched from using LGPL-3+ to LGPL-2.1+. People who know me know that I love the v3 license family of GPL licenses I like it for tivoization protection, it s explicit compatibility with some important other licenses and cosmetic details, like entities not loosing their right to use the software forever after a license violation. However, a LGPL-3+ library does not mix well with projects licensed under other open source licenses, mainly GPL-2-only projects. I want libappstream to be used by anyone without forcing the project to change its license. For some reason, using the library from proprietary code is easier than using it from a GPL-2-only open source project. The license change was also a popular request of people wanting to use the library, so I made the switch with 0.7. If you want to know more about the LGPL-3 issues, I recommend reading this blogpost by Nikos (GnuTLS). On the code-side, libappstream received a large pile of bugfixes and some internal restructuring. This makes the cache builder about 5% faster (depending on your system and the amount of metadata which needs to be processed) and prepares for future changes (e.g. I plan to obsolete PackageKit s desktop-file-database in the long term). The library also brings back support for legacy AppData files, which it can now read. However, appstream-validate will not validate these files (and kindly ask you to migrate to the new format). The appstream-index tool received some changes, making it s command-line interface a bit more modern. It is also possible now to place the Xapian cache at arbitrary locations, which is a nice feature for developers. Additionally, the testsuite got improved and should now work on systems which do not have metadata installed. Of course, libappstream also implements all features of the new 0.7 specification. With the 0.7 release, some symbols were removed which have been deprecated for a few releases, most notably as_component_get/set_idname, as_database_find_components_by_str, as_component_get/set_homepage and the pkgname property of AsComponent (which is now a string array and called pkgnames ). API level was bumped to 1. Appstream-Qt A Qt library to access AppStream data has been added. So if you want to use AppStream metadata in your Qt application, you can easily do that now without touching any GLib/GObject based code! Special thanks to Sune Vuorela for his nice rework of the Qt library! And that s it with the changes for now! Thanks to everyone who helped making 0.7 ready, being it feedback, contributions to the documentation, translation or coding. You can get the release tarballs at Freedesktop. Have fun!

9 July 2014

Sune Vuorela: CMake and library properties

When writing libraries with CMake, you need to set a couple of properties, especially the VERSION and SOVERSION properties. For library libbar, it could look like:
set_property(TARGET bar PROPERTY VERSION 0.0.0 )
set_property(TARGET bar PROPERTY SOVERSION 0 )
This will give you a libbar.so => libbar.so.0 => libbar.so.0.0.0 symlink chain with a SONAME of libbar.so.0 encoded into the library. The SOVERSION target property controls the number in the middle part of the symlink chain as well as the numeric part of the SONAME encoded into the library. The VERSION target property controls the last part of the last element of the symlink chain This also means that the first part of VERSION should match what you put in SOVERSION to avoid surprises for others and for the future you. Both these properties control Technical parts and should be looked at from a technical perspective. They should not be used for the version of the software , but purely for the technical versioning of the library. In the kdeexamples git repository, it is handled like this:
set(BAR_VERSION_MAJOR 1)
set(BAR_VERSION_MINOR 2)
set(BAR_VERSION_PATCH 3)
set(BAR_VERSION $ BAR_VERSION_MAJOR .$ BAR_VERSION_MINOR .$ BAR_VERSION_PATCH )
And a bit later:
set_target_properties(bar PROPERTIES VERSION $ BAR_VERSION
SOVERSION $ BAR_VERSION_MAJOR )
which is a fine way to ensure that things actually matches. Oh. And these components is not something that should be inherited from other external projects. So people, please be careful to use these correct.

9 June 2014

Floris Stoica-Marcu: GSoC 2014 Muon package and initial apt-listbugs integration [Week3]

Hello, The past week I ve finished the muon package, available @ git.debian.org/?p=pkg-kde/kde-extras/muon.git on the gsoc-floris-2014 branch (use at your own risk!) Also, I ve finished up the KAuth support when adding/removing repos (already pushed to the master of Muon). Most importantly, I ve started integrating apt-listbugs a most important component of Debian. What does this mean and how it will affect the end-user? Well, having apt-listbugs integrated means that the user will be warned when installing packages if the packages have some serious/grave/critical bugs! I am still working on making it async and I hope to be done by tonight. Also, some formatting work on the dialog is still needed. Check it out bellow: Apt-listbugs in action After I finish the apt-listbugs integration, I will get started on writing up some apt unit tests as suggested by Aleix. Also, I will work with Sune on updating the qapt package as well. In a nutshell: This week:
*muon package
*KAuth support implemented
*initial apt-listbugs integration Plans for next week:
*finish apt-listbugs integration (async, with pretty formatting!)
*apt unit tests
*update qapt package Thanks for reading, see you next week!
Floris.

3 June 2014

Sune Vuorela: Bringing KDE forward

The almost-yearly large KDE-sprint in Randa, Switzerland is doing a fundraiser to get this year s event running. See http://www.kde.org/fundraisers/randameetings2014/ This year, it is besides the recurring multimedia topics, a lot about improving the new KDE Frameworks, the related documentation and the development experience with IDE s and such. It is also a good way to come full circle, since it was back in 2011 when I was at the Randa Meetings that the KDE Frameworks initiative was started. So once again: http://www.kde.org/fundraisers/randameetings2014/

31 May 2014

Floris Stoica-Marcu: GSoC2014 Muon and sudo [Week2]

Hello, This has been a terrific week and a real learning experience for me. I finished packaging both Muon and QApt for Debian; my first two real debian packages, with very different packaging styles! Sune (svuorela), Maximiliano (maxy) and others helped me allot to understand the tools and I thank them very much for their support. While the first part of this second week was all about trying to make a solid package, the second part was me figuring out Policykit and KAuth in order for us to let go (as much as possible) of Kdesudo. I have managed to do a complete turnaround from kdesudo through policykit and now I am working on making an add-repo helper in C++/Qt using KAuth to keep it in line with QApt, in order to have a more uniform codebase. Big thanks to Aleix (apol) that guided me through the different uses of policykit and Kauth. To keep it short, policykit will not be used directly except QApt, in every other case we ll use KAuth. I m very close to finishing the KAuth add-repo helper and that will add improved functionality, as it extends well in what I will be doing next: renouncing specific backend support; The helper will manage how backends add/remove repos, meaning that if you use PackageKit you will no longer be tied to Apt if you want to use Muon! Here is a screenshot of the configure-software button in muon-discovery (finally) working on Debian and launching software-properties-kde:
Muon Software properties And below are some screens of Muon in the wild, running on Debian:
Auth required through policykit

Auth required through policykit

Adding Sources

Adding Sources

I hope you enjoyed this update and stay tuned for the debian package which is currently under review. Floris.

23 May 2014

Floris Stoica-Marcu: GSoC2014 Debianizing Muon [Week 1]

Hello, My name is Floris (FlowRiser) and during GSoC I will be working at the project Getting Muon ready . I am guided by two awesome mentors: Sune Vuorela (svuorela) and Aleix Pol (apol). Essentially what we are trying to accomplish is not only port Muon to Debian, but also make it part of Debian; making users that use and love Debian confortable with it. Some of our goals are: integrating apt-listbugs into muon, making installing updates easier and contributing to both KDE and Debian at the same time. The exact plan (week by week), subject to change is here: https://wiki.debian.org/SummerOfCode2014/StudentApplications/FlorisAndreiStoicaMarcu. This week, we focused on getting the core functionality of Muon for Debian; Browsing packages, installing/updating, getting update notifications; Today I will also be making some packaging work, so that other people can begin testing Muon. The exact changes so far:
*changes to the .desktop files parsing, so you can browse packages as expected
*changes to the way more than one backend interract
*created a new releasechecker script for future use Plans for next week include:
*fixing kdesudo use
*fixing use of specific backend resources Cheers,
Floris.

1 March 2014

Sune Vuorela: Diploma thesis about media choice and usage in Free Software communities: I need your help

My hard-working KDE friend Mario asked me to help him to get Debian people to help him with his thesis. Here is what he writes: Dear Free Software contributor* I m currently in the process of writing my diploma thesis. I ve worked hard during the last few weeks and months on a questionnaire which shall collect some data for my thesis. Furthermore the data of this survey will be interesting for the Free Software communities as well. So please take some time or add it to your todo list or, even better, go directly to my questionnaire and help me make a great diploma thesis and improve the Free Software community in some ways. The questionnaire takes some 20 to 30 minutes. At the end of the questionnaire you ll find a way to participate in a draw where you can even win something nice. In a first round I got the feedback that the length of the questionnaire and that some questions (mostly the ones at the beginning of the questionnaire about the 12 different tasks) are quite abstract and difficult. But please try it, try your best and take the time and brain power. The remaining part of the questionnaire [1] (after these two pages with the tasks questions) is quite
easy and quickly done. And you have the possibility to come back to where you
have left filling in the questionnaire after a shorter or longer break. And if there are any questions, feedback or you need help don t hesitate a moment to write me an email or ping me on IRC (freenode.net and oftc.net) as unormal. This survey will be open till Sunday, the 9th of March 2014, 23.59 UTC. Thanks to all for reading and helping and towards the summer of 2014 you can read here what all the data you gave me showed us and where we can learn and improve. Thanks in advance and best regards
Mario Fux * By contributor I mean not just developers but translators, artist, usability
people, documentation writers and many more. Everybody who contributes in one
way or the other to Free Software.

19 February 2014

Sune Vuorela: 9.0 Zurg

I welcome Debian 9.0 Zurg! Thanks to Phoronix and to Wikipedia editor at 213.81.201.123 and 149.255.97.132 for their high quality fact checking.

10 February 2014

Mario Lang: Neurofunkcasts

I have always loved Drum and Bass. In 2013 I rediscovered my love for Darkstep and Neurofunk, and found that these genres have developed quite a lot in the recent years. Some labels like Black Sun Empire and Evol Intent produce mixes/sets on a regular basis as podcasts these days. This article aggregates some neurofunk podcasts I like a lot, most recent first. Enjoy 33 hours and 57 minutes of fun with dark and energizing beats. Thanks to BSE Contrax and Evol Intent for providing such high quality sets. You can also see the Python source for the program that was used to generate this page.

5 February 2014

Sune Vuorela: CMake skeleton for small Qt projects

For small Qt-projects, I have for a long time been using qmake, mostly because qmake -project gives me a working build in most cases, but once the project grows a bit, I have switched to cmake because there is just things there I like better. So, I thought how to start with cmake instead, and ended up writing a small script. I guess I should share it:
#! /bin/sh # Simple script that generates a cmake project file for a Qt project #
# Copyright (c) 2013 Sune Vuorela
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the Software ), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED AS IS , WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# CPPFILES= $(ls *.cpp 2>/dev/null) UIFILES= $(ls *.ui 2>/dev/null) QRCFILES= $(ls *.qrc 2>/dev/null) NAME= $(basename $(pwd)) error()
echo ERROR: $@
exit 1
debug()
[ -z "$ DEBUG " ] && return
echo DEBUG: $@ 1>&2
# sanity checks if [ -e "CMakeLists.txt" ]
then
error CMakeLists.txt found. Doing nothing.
fi if [ -z "$ CPPFILES " ]
then
error No cpp files found
fi debug NAME $ NAME
debug CPPFILES $ CPPFILES
debug UIFILES $ UIFILES
debug QRCFILES $ QRCFILES # First part of cmake files
cat >> CMakeLists.txt << __EOHEADER__
project($ NAME ) cmake_minimum_required(VERSION 2.8.11) find_package(Qt5 CONFIG REQUIRED Widgets) set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON) __EOHEADER__ # Handle ui files if any
if [ -n "$ UIFILES " ]
then
cat >> CMakeLists.txt << __EOUI__
set($ NAME _ui $ UIFILES )
qt5_wrap_ui($ NAME _wrapped_ui \$ $ NAME _ui ) __EOUI__ UIWRAPPED="\$ $ NAME _wrapped_ui "
debug prepared UIWRAPPED $ UIWRAPPED
fi # Handle qrc files if any
if [ -n "$ QRCFILES " ]
then cat >> CMakeLists.txt << __EOQRC__
set($ NAME _qrc $ QRCFILES )
qt5_add_resources($ NAME _wrapped_qrc \$ $ NAME _qrc ) __EOQRC__ QRCWRAPPED="\$ $ NAME _wrapped_qrc "
debug prepared QRCWRAPPED $ QRCWRAPPED
fi # Build the actual library
cat >> CMakeLists.txt << __EOCPP__
set($ NAME _src $ CPPFILES ) add_executable($ NAME \$ $ NAME _src $ UIWRAPPED $ QRCWRAPPED ) target_link_libraries($ NAME Qt5::Widgets )
__EOCPP__
I ve saved it locally as cmake-qtproject and it works with at least cmake 2.8.11. I hope wordpress doesn t make too much mess of it. Have fun.

11 August 2013

Lisandro Dami&aacute;n Nicanor P&eacute;rez Meyer: Qt in Debian: using Qt4 and/or Qt5 in your packages

Hi everyone! We now have both Qt4 and Qt5 in the archive. Those using Qt4 should not need to make any changes in their packages, although you can be extra-safe with a few steps. Don't rush, just read below.
Some backgroundSune took the time some months ago to consult upstream for a sane way to allow both SDKs to coexist without us distros having to reinvent the wheel choosing which tools have to be in use in each case.

After a long discussion, upstream decided to write qtchooser (already in the archive) to be able to select between Qt4, Qt5 and even special user's cases like cross-platform builds.

So instead of going trough Debian's alternatives as we did with Qt3/Qt4, we will make use of this new tool.
My package uses Qt, how should I proceed?There are many ways of choosing either of the versions of Qt:

- Using any qtchooser method (preferred):

* Exporting QT_SELECT with 4, qt4, 5 or qt5 as a value in debian/rules.
* Call the tool using the '-qtx' parameter, where x can be replaced with any of the options above.

- Build-depending on qt4-default or qt5-default. You can't B-D on both of them, as they can't coexist.

It is good to notice that:

- any qtchooser method will take precedence over build depending on qtX-default.
- If you export XDG_CONFIG_DIRS it will ignore the default paths to qtchooser's configs we setted up in the packages.

We have also provided qt4-[arch-triplet] and qt5-[arch-triplet] options for special cases.

Once again, if you are already using Qt4, there is no need to rush. See below.

Can is use both Qt4 and Qt5 in my package?You can't mix Qt4 and Qt5 in the same binary, but you may provide libraries compiled against one or the other. For example, your source package foo could provide both libqt4foo1 and libqt5foo1. You need to mangle your debian/rules and/or build system accordingly to achieve this. At the time of this writing I don't know of any examples yet.

So are you going to break the archive with a big transition?No, we have done our best to avoid having to make any changes to existing Qt4 packages. Qt tools should default to Qt4 except if overriden by any method described above.

My package uses Qt4, can I leave it as it is?While there is no need to apply the changes in this case, explicitly setting the Qt version will surely not hurt at all. But don't rush ;-)

24 March 2013

Sune Vuorela: Announcing Rawatar Qt5 libravatar client library

So. following up on my previous post about implementing a libravatar server, this will be an announcement of a quick Qt5 based client library for libravatar so that everyone can put avatars everywhere! Get it while it is hot on
git.kde.org There isn t much screenshots to show off, given it is effectively just converting a string with an email into a URL for a image. And thanks to Martin Sandsmark for coming up with such a great name. Now I expect him to show off what it can be used for. Another thanks goes to Andreas Hartmetz for going thru the code & api.

19 March 2013

Sune Vuorela: Simple Libravatar service

So, since recently bugs.debian.org has started using libravatar avatars. Not yet the federated service, but that s supposedly in the works. But for that, one of course need to run each own service. Which I wanted to do. In a simple way. So I did it.
_avatars._tcp.pusling.com. 43200 IN SRV 10 10 80 static.pusling.com.
and in my root dir for that one I have source/ and avatar/
$ ls
avatar source
In source, I have default.png which I m serving and a series of avatars for various email addresses
$ ls source/
debian@pusling.com default.png
and then I have a simple script to generate the right file names:
#! /bin/sh (cd avatar;
ls while read file ; do [ -L $file ] && rm $file ; done
)
for i in source/*@* ; do ln -s ../$i avatar/$(echo -n $(basename $i) sha256sum sed s/-// ) ; done
for i in source/*@* ; do ln -s ../$i avatar/$(echo -n $(basename $i) md5sum sed s/-// ) ; done
and the last piece of magic to get everything to work:
$ cat avatar/.htaccess
ErrorDocument 404 /source/default.png
ForceType image/png <Files index.html >
ForceType text/html
</Files>
and a set of index.html files created with touch . So there you go. A simple libravatar service, ignoring some pieces of the spec, but it should be good enough for most people. I might save my rants about the libravatar spec for another day. But it involves implementing a complete redirecting service and scaling of images. When will debian.org and kde.org start providing avatar services?

Next.

Previous.